package com.yy.wga.mp.module.income.listener;

import com.yy.wga.mp.module.income.dto.OrderUpGradeCommissionDTO;
import com.yy.wga.mp.module.income.manager.OrderCommissionManager;
import com.yy.wga.mp.module.income.manager.OrderUpGradeCommissionManager;
import lombok.RequiredArgsConstructor;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @Author: gc
 * @Date: 2024/10/26
 * @Description:
 **/
@Component
@RequiredArgsConstructor
public class OrderUpgradeCommissionEventListener implements ApplicationListener<OrderUpGradeCommissionDTO> {
    private final OrderCommissionManager orderCommissionManager;
    private final OrderUpGradeCommissionManager orderUpGradeCommissionManager;

    /**
     * 升级权益直通车分佣
     * @param event
     */
    public void onApplicationEvent(OrderUpGradeCommissionDTO event) {
        orderUpGradeCommissionManager.commission(event);
    }
}
